package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.WorkInformation;
import cn.wolfcode.crm.service.IWorkInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("workInformation")
public class WorkInformationController {
    @Autowired
    public IWorkInformationService workInformationService;

    @ResponseBody
    @RequestMapping("selectByPrimaryKey")
    public WorkInformation selectByPrimaryKey(Long id) {
        WorkInformation workInformation = workInformationService.selectByPrimaryKey(id);
        return workInformation ;
    }
    @ResponseBody
    @RequestMapping("selectByEmployeeId")
    public List<WorkInformation> selectByEmployeeId(Long empId) {
        List<WorkInformation> workInformations = workInformationService.selectByEmployeeId(empId);
        return workInformations ;
    }

    @RequestMapping("selectAll")
    @ResponseBody
    public List<WorkInformation> selectAll() {
        return workInformationService.selectAll();
    }

}
